<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            background-color: gray;
            padding: 10px;
            display: flex;
        }
        .container > div {
            padding: 5px;
            width: 50px;
            background-color: orange;
        }
    </style>
</head>
<body>
    <h2>justify-content 属性 demo</h2>
    <h3>flex-start</h3>
    <div class="container" style="justify-content: flex-start;">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
    <h3>flex-end</h3>
    <div class="container" style="justify-content: flex-end;">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
    <h3>center</h3>
    <div class="container" style="justify-content: center;">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
    <h3>space-between</h3>
    <p>将第一个弹性子元素放在主轴开始的地方，最后一个子元素放在主轴结 束的地方，剩下的子元素间隔均匀地放在这两者之间的区域。</p>
    <div class="container" style="justify-content: space-between;">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
    <h3>space-around</h3>
    <p>值 space-around 类似 space-between，只不过给第一个子元素的前面和最后一个子元素的后面也加上了相同的间距。</p>
    <div class="container" style="justify-content: space-around;">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
</body>
</html>